package com.panshi;

import com.panshi.bean.PageUtil;
import com.panshi.bean.SearchBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "search-service-eureka", path = "sear")
@Component
public interface ISearchApi {
    @PostMapping("/search")
    @ApiOperation("关键词搜索问题")
    public PageUtil<List<SearchBean>> searchData(@RequestBody PageUtil pu);

    @GetMapping("/hostSearch")
    @ApiOperation("热搜排行")
    public List<SearchBean> hostSearch();
}
